// pages/editpersonal/editpersonal.js
import renting from "../../models/Renting"
Page({
  data: {
      userinfo:{ card_img : ""},
      imgList:[],
  },

  onLoad: function (options) {
    // 远程获取数据
    renting.getUserInfo().then(ret=>{
      console.log(ret);
      this.setData({
        userinfo:ret.data.data
      })
    })
  },
  dopost(evt){
    renting.updateUserInfo(evt.detail.value).then(ret=>{
      // 进行逻辑跳转
      wx.navigateTo({
        url:'/pages/personal/personal'
      })
    })
  },
  upfile(){
    renting.upfile(this);
  }
})